import 'dart:ui';

import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/cupertino.dart' hide Action;

import '../global_store/state.dart';

class PracticeVoiceState
    implements GlobalBaseState, Cloneable<PracticeVoiceState> {
  TextEditingController titleEditController;
  FocusNode focusNodeTitle;
  TextEditingController contentEditController;
  FocusNode focusNodeContent;

  bool isTitle = true;
  String aliToken = '';
  String typeValue;
  String gradeValue;

  @override
  PracticeVoiceState clone() {
    return PracticeVoiceState()
      ..themeColor = themeColor
      ..userInfo = userInfo
      ..titleEditController = titleEditController
      ..focusNodeTitle = focusNodeTitle
      ..contentEditController = contentEditController
      ..focusNodeContent = focusNodeContent
      ..isTitle = isTitle
      ..aliToken = aliToken
      ..typeValue = typeValue
      ..gradeValue = gradeValue;
  }

  @override
  Color themeColor;

  @override
  Map<String, dynamic> userInfo;
}

PracticeVoiceState initState(Map<String, dynamic> args) {
  return PracticeVoiceState()
    ..titleEditController = TextEditingController()
    ..focusNodeTitle = FocusNode()
    ..contentEditController = TextEditingController()
    ..focusNodeContent = FocusNode();
}
